package com.haidechizi.designpattern.proxy.dynamic.jdk;

import java.lang.reflect.Proxy;

/**
 * @author haidechizi
 */
public class ProxyHelper {

    public static <T> T getProxy(Object object) {
        return (T) Proxy.newProxyInstance(object.getClass().getClassLoader(),
                object.getClass().getInterfaces(), new DynamicLog(object));
    }
}
